﻿using UnityEngine;
using System.Collections;

public static class Vector3Extension
{
    //public static bool operator >(this Vector3 source, Vector3 rhs)
    //{
    //    return false;
    //}

    //public static bool operator <(this Vector3 source, Vector3 rhs)
    //{
    //    return false;
    //}

    public static Vector3 Multiple (this Vector3 source, Vector3 rhs)
    {
        return new Vector3(source.x * rhs.x,
            source.y * rhs.y,
            source.z * rhs.z);
    }

    public static Vector3 Divide(this Vector3 source, Vector3 rhs)
    {
        return new Vector3(source.x / rhs.x,
            source.y / rhs.y,
            source.z / rhs.z);
    }

    public static Vector3 MidPoint(this Vector3 source, Vector3 rhs)
    {
        return new Vector3(source.x + rhs.x,
            source.y + rhs.y,
            source.z + rhs.z) * 0.5f;
    }

    public static bool GreaterThan(this Vector3 source, Vector3 rhs)
    {
        if (source.x > rhs.x && source.y > rhs.y && source.z > rhs.z)
            return true;
        return false;
    }

    public static bool LessThan(this Vector3 source, Vector3 rhs)
    {
        if (source.x < rhs.x && source.y < rhs.y && source.z < rhs.z)
            return true;
        return false;
    }
}
